package com.snopy.designPattern.structure.bridge.impl;

import com.snopy.designPattern.structure.bridge.inter.MessageSender;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * @author snopy
 * @version 1.0.0
 * @classname EmailMessageSender
 * @description
 * @email 77912204@qq.com
 * @date 2022/03/02 18:21
 */
@Slf4j
@Setter
@Getter
public class EmailMessageSender implements MessageSender {
    private String message;
    @Override
    public void sendMessage() {
        if (message!=null){
            log.info("EmailMessageSender: Sending email message...{}",message);
        }else {
            log.info("EmailMessageSender: Sending email message...");
        }
    }

    @Override
    public void msg(String msg) {
        this.message = msg;
    }
}
